# Contributor: Duncan Bellamy <dunk@denkimushi.com>
# Maintainer: Duncan Bellamy <dunk@denkimushi.com>
pkgname=py3-pytest-httpx
pkgver=0.33.0
pkgrel=0
pkgdesc="send responses to httpx"
url="https://colin-b.github.io/pytest_httpx/"
arch="noarch"
license="MIT"
depends="py3-httpx py3-pytest"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-pytest-asyncio"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/Colin-b/pytest_httpx/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/pytest_httpx-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" .dist/*.whl
}

sha512sums="
96709b479d8d7cd15e5aaa0ea4ab8249253fc9bffc71d0e9de2d5d0c84f286ba1990ee682c3e6dd54a62bfd0c71c9b59d9c2a21ea9df8eac0f4dee98f38f2008  py3-pytest-httpx-0.33.0.tar.gz
"
